
//
//  JumpViewController.m
//  xiaowanTravel
//
//  Created by wyzcWLB on 16/10/6.
//  Copyright © 2016年 wyzcWLB. All rights reserved.
//

#import "JumpViewController.h"
#import "discount.h"
#import <AFNetworking.h>

@interface JumpViewController ()

@end

@implementation JumpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0 , Screen_Width, Screen_Height)];
    
    [_webView setOpaque:NO];//opaque是不透明的意思
    [_webView setScalesPageToFit:YES];//自动缩放以适应屏幕
    [self.view addSubview:_webView];
    
    [self addLeftBack];
    //加载内容
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
}
#pragma mark 设置返回按钮
-(void)addLeftBack{
    
    UIButton *back = [[UIButton alloc]initWithFrame:CGRectMake(10, 20, 14, 14)];
    back.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"icon_trip_cancel"]];
    [self.webView addSubview:back];
    [back addTarget:self action:@selector(goToBack) forControlEvents:UIControlEventTouchUpInside];
}
-(void)goToBack{
    //返回
    [self dismissModalViewControllerAnimated:YES];
    
}
@end